package org.dromara.agriculture.domain.bo;

import org.dromara.agriculture.domain.AgricultureUnit;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * 种植单元业务对象 agriculture_unit
 *
 * @author Robin
 * @date 2024-12-05
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = AgricultureUnit.class, reverseConvertGenerate = false)
public class AgricultureUnitBo extends BaseEntity {

    /**
     * ID
     */
    @NotNull(message = "ID不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 地块id
     */
    @NotNull(message = "地块id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long landId;

    /**
     * 单元要素类型：1设备 2监控 3种植批次 4自动化场景  其他类型可自由拓展
     */
    @NotNull(message = "单元要素类型：1设备 2监控 3种植批次 4自动化场景  其他类型可自由拓展不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long type;

    /**
     * 要素id
     */
    @NotNull(message = "要素id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long elementId;


}
